from flask import Flask, render_template, request
from flask_cors import CORS
from teahcer import teacher_api
from student import student_api
from task import task_api
from job import job_api
from classes import class_api

app = Flask(__name__)
app.register_blueprint(teacher_api)
app.register_blueprint(student_api)
app.register_blueprint(job_api)
app.register_blueprint(task_api)
app.register_blueprint(class_api)
CORS(app)	# 注册CORS
app.config['JSON_AS_ASCII'] = False
app.config['UPLOAD_FOLDER'] = 'upload/'

@app.route('/')
def index():
    return render_template('login.html')

app.run(host='0.0.0.0',port=8000,debug=True)